<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="zhangfn" uri="http://github.com/zhangkaitao/tags/zhang-functions" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/bootstrap-responsive.css" />
    
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.js"></script>
    
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/ckform.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/showdate.js"></script>
      <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/laydate/laydate.js"></script>
   	<script src="${pageContext.request.contextPath}/static/js/zoom.js"></script>
   		<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-1.6.2.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/Validform_v4.0_min.js"></script>
	 <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style2.css" type="text/css" media="all" />
     <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/demo.css" type="text/css" media="all" />
    <script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/static/plugins/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/static/plugins/ueditor/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/static/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script>
        window.UEDITOR_HOME_URL = "${pageContext.request.contextPath}/static/plugins/ueditor/";
    </script>

</head>
<body class="main" class="wraper">

<form:form method="post" commandName="exp" class="registerform" enctype="multipart/form-data">
<table class="table table-bordered table-hover definewidth m10" style="margin-left:3%;margin-top:2%;">
    <tr><td colspan="2"><strong>体验券详情</strong></td><tr>
    <tr>  
        <td width="10%" class="tableleft" >活动名称 </td>
        <td><form:input path="activityName" style="height: 41px; width: 500px" datatype="*"  nullmsg="活动名称不能为空！" /></td>     
    </tr>
    <tr> 
        <td width="10%" class="tableleft" >活动详情 </td>
        <td><form:textarea  id='editor' path="activityDetails" contenteditable="true" cssStyle="width: 900px;
    min-height: 420px;
    max-height: 600px;
    _height: 420px;

    padding: 3px;
    outline: 0;
    border: 1px solid #999999;
    font-size: 12px;
    word-wrap: break-word;
    overflow-x: hidden;
    overflow-y: auto;
    _overflow-y: visible;"  datatype="*"  nullmsg="活动详情不能为空！" /></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft" >*活动开始时间</td>
<%--         <td><form:input path="activityStartTime" id="time1"  onClick="return Calendar('time1');" class="text_time" /></td>
 --%>   	 <td><form:input path="activityStartTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon" datatype="*"  nullmsg="活动开始时间不能为空！"/></td>
 
  </tr>
     <tr>
        <td width="10%" class="tableleft" >*活动结束时间</td>
<%--         <td><form:input path="activityOverTime" id="time2"  onClick="return Calendar('time2');" class="text_time" /></td>
 --%>    <td><form:input path="activityOverTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon" datatype="*"  nullmsg="活动结束时间不能为空！"/></td>
 
 </tr>
    <tr>
        <td width="10%" class="tableleft" >活动亮点 </td>
        <td><form:textarea  id='editor' path="hightlight" contenteditable="true" cssStyle="width: 400px;
    min-height: 100px;
    max-height: 200px;
    _height: 100px;

    padding: 3px;
    outline: 0;
    border: 1px solid #999999;
    font-size: 12px;
    word-wrap: break-word;
    overflow-x: hidden;
    overflow-y: auto;
    _overflow-y: visible;"  datatype="*"  nullmsg="输入活动亮点" /></td>
    </tr>

    <tr>
        <td width="10%" class="tableleft" >*商家名称 </td>
        <td><form:input path="businessName" style="height: 41px; width: 500px" datatype="*"  nullmsg="商家名称不能为空！"/></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft" >*商家电话</td>
        <td><form:input path="businessPhone" style="height: 41px; width: 500px" datatype="*"  nullmsg="商家电话不能为空！"/></td>
    </tr>
    <tr>  
        <td width="10%" class="tableleft" >*商家地址</td>
        <td><form:input path="businessAddress" style="height: 41px; width: 500px" datatype="*"  nullmsg="商家地址不能为空！"/></td>
    </tr>
	<tr>
        <td class="tableleft">*适用范围</td>
        <td> <div style="margin:0 auto;">
        		 <form:select path="userRole">
                     <form:option value="0">不限</form:option>
                   <form:option value="1">男</form:option>  
                   <form:option value="2">女</form:option>  
                 </form:select>  	            
             </div> 
        </td>
    </tr> 
    <tr>
        <td class="tableleft">*体验券类型</td>
        <td><div style="margin:0 auto;">
        		 <form:select path="ticketType">                    
                   <form:option value="0">直接送</form:option>
                   <form:option value="1">后台发</form:option>
                 </form:select>  	            
            </div> 
        </td>
    </tr>
    <%--<tr>
        <td width="10%" class="tableleft" >*商家地址经度</td>
        <td><form:input path="businessLng" style="height: 41px; width: 500px" datatype="*"  nullmsg="商家地址经度不能为空！"/></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft" >*商家地址纬度</td>
        <td><form:input path="businessLat" style="height: 41px; width: 500px" datatype="*"  nullmsg="商家地址纬度不能为空！"/></td>
    </tr>--%>
     <tr>
        <td width="10%" class="tableleft" >*体验券数量</td>
        <td><form:input path="ticketCount" style="height: 41px; width: 500px" datatype="*"  nullmsg="体验券数量不能为空！"/></td>
    </tr> 
<%--    <tr>
        <td class="tableleft">*类型</td>
        <td><div style="margin:0 auto;">
        		 <form:select path="type">                    
                   <form:option value="0">普通</form:option> 
                    <form:option value="1">主推</form:option>   
                 </form:select>  	            
            </div> 
        </td>
    </tr>--%>
    <tr>
        <td width="10%" class="tableleft" >*排序</td>
        <td><form:input path="sequence" style="height: 41px; width: 500px" datatype="*"  nullmsg="序列号不能为空！"/></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft" >HTML地址</td>
        <td><form:input path="activityUrl" style="height: 41px; width: 500px" /></td>
    </tr>
    <!--<tr>
         <td width="10%" class="tableleft" >体验券已使用数量</td>
         <td><form:input path="ticketAlreadyCount" style="height: 41px; width: 500px"/></td>
     </tr>-->
    <c:if test="${exp.activityPic1 != null or exp.activityPic2 != null or exp.activityPic3 != null}">
     <tr> 
     <td width="10%" class="tableleft" >活动图片</td>
     <c:if test="${exp.activityPic1 != null}">
     	<td><img src="${exp.activityPic1}" data-action="zoom" width="334px" /><br>
     </c:if>
     <c:if test="${exp.activityPic2 != null}">
     <img src="${exp.activityPic2}" data-action="zoom" width="334px" /><br>
     </c:if>
     <c:if test="${exp.activityPic3 != null}">
     <img src="${exp.activityPic3}" data-action="zoom" width="334px" />
     </c:if>
     </td>
     </tr>   
    </c:if>
    <c:if test="${op != '删除'}">    
     <tr>
        <td class="tableleft">上传活动图片</td>
        <td>图片1：<input type="file" name="files" /><br>
                                    图片2：<input type="file" name="files" /><br>
                                    图片3：<input type="file" name="files" /></td>        
    </tr>
    </c:if> 	
    <tr>
        <td class="tableleft"></td>
        <td>
           <form:button>${op}</form:button>             
       </td>
    </tr>
</table>
</form:form>
</body>
<script type="text/javascript">
$(function(){
	//$(".registerform").Validform();  //就这一行代码！;
    var ue = UE.getEditor('editor' , {initialFrameHeight:400 ,autoHeightEnabled:false});
	$(".registerform").Validform({
		tiptype:1
	});
})
</script>
</html>
<script>
function jump(){
 window.location.href="placardQuery.html";
}
</script>